package com.rao.crm.dao;

import org.hibernate.criterion.DetachedCriteria;

import java.io.Serializable;
import java.util.List;

/**
 * @author Srao
 * @version 1.0
 * @className BaseDao
 * @date 2019/9/21 14:31
 * @package com.rao.crm.dao
 * @description
 */
public interface BaseDao<T> {

    void save(T t);

    void delete(T t);

    void update(T t);

    T findById(Serializable id);

    Integer findTotalCount(DetachedCriteria detachedCriteria);

    List<T> findAll();

    List<T> findAll(DetachedCriteria detachedCriteria, Integer startIndex, Integer pageSize);

}
